package com.kong.multids.service;

import com.kong.multids.model.Cat;
import com.kong.multids.model.Dog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gedachao
 * @description 事务测试
 * @date 2020/5/30 16:27
 */
@Service
public class Service5Impl {

    @Autowired
    Service2Impl service2;
    @Autowired
    Service3Impl service3;

//    @Transactional
    public void add(){
        Cat cat = new Cat(52, "姆巴佩", "世界杯");
        Dog dog = new Dog(52, "哈皮第", "雁荡山");
        service2.add(cat);
        System.out.println("cat执行完成");
        int i = 10/0;
        service3.addDog(dog);
    }


}
